#include <iostream>
using namespace std;

int main()
{
    string s;
    cin>>s;
    double res;
    double num=0;
    for (int i=0;i<s.size();i++)
    {
        if (s[i]=='2')
            num++;
    }
    if (s[0]=='-')
        res=num/(s.size()-1)*1.5;
    else
        res=num/s.size();
    if ((s[s.size()-1]-'0')%2==0)
        res*=2;
    printf("%.2f%%",res*100);
}